package aries;

/******************************************************************************
 * You may modify, publish, and use Aries for your own purpose. BUT
 * DON'T REMOVE THIS TEXT.
 * Visit my facebook: http://www.facebook.com/freeskies or
 * Follow my twitter: @freeskys
 *
 *
 * Author: Harditya Rahmat Ramadhan
 * Licence: GPLv2
 *****************************************************************************/

public class Setting {

    /**
     * Show exception message.
     */
    private static Boolean showException = false;
    
    /**
     * Aries language.
     */
    private static Locales language;
    
    /**
     * Use encrypt or not.
     */
    private static Boolean useEncrypt = false;
    
    /**
     * Use filter on sql statement or not.
     */
    private static Boolean useFilter = false;
    
    /**
     * Aries encrypt key.
     */
    public static String key = "LKASJDLKJ798lkjl^&";
    
    /**
     * Language parameter.
     */
    public static final byte ENGLISH_US = 0;
    
    /**
     * Language parameter.
     */
    public static final byte INDONESIAN_ID = 1;

    /**
     * Set encrypt.
     * 
     * @return Boolean
     */
    public static Boolean getUseEncrypt() {
	return useEncrypt;
    }
    
    /**
     * Get encrypt.
     * 
     * @param useEncrypt
     */
    public static void setUseEncrypt(Boolean useEncrypt) {
	Setting.useEncrypt = useEncrypt;
    }

    /**
     * Get use filter.
     * 
     * @return useFilter
     */
    public static Boolean getUseFilter() {
        return useFilter;
    }

    /**
     * Set use filter.
     * 
     * @param useFilter 
     */
    public static void setUseFilter(Boolean useFilter) {
        Setting.useFilter = useFilter;
    }
    
    /**
     * Get show exception.
     */
    public static Boolean getShowException() {
        return showException;
    }

    /**
     * Set show exception.
     * 
     * @param showException 
     */
    public static void setShowException(Boolean showException) {
        Setting.showException = showException;
    }
    
    /**
     * Get current language.
     * 
     * @return Locales
     */
    public static Locales getCurrentLanguage() {
        return Setting.language;
    }

    /**
     * Get language.
     */
    public static String getLanguage(byte lang) {
        String theLang = "";
        switch (lang) {
            case 0: theLang = "aries/lang/en_US"; break;
            case 1: theLang = "aries/lang/id_ID"; break;
        }
        return theLang;
    }

    /**
     * Set language.
     * 
     * @param language 
     */
    public static void setLanguage(byte lang) {
        switch (lang) {
            case 0: Setting.language = new Locales("aries/lang/en_US"); break;
            case 1: Setting.language = new Locales("aries/lang/id_ID"); break;
        }
    }
    
}